sql, insights: record failed transactions due to commit #110898
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously we did not record failed transactions due to a failed
commit in the insights system. This commit captures those transactions
in the insights system by propagating the payload error associated with
a failed commit to the stats recording step. If the transaction error
is nil, we will attempt to find the last statement error for scenarios
where the error is not propagated to the payload of TxnCommit/Aborted
states.
In addition, the
Status
(completed or failed) of a txn is now basedon whether the transaction has committed at the time of insights recording.
Previously it was also based on the presence of failed stmts.
Fixes: #110846
Release note (ui change): In the Insights page in DB Console, users can now see
failed transactions and their error messages when the transaction fails on the
COMMIT stage.